package com.tencent.welink.api.device;

import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import com.tencent.welink.api.OpenApiTokenChange;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * Created by junchihe on 2020/6/4.
 */
public class GetDeviceList extends WelinkOpenApi {
    private static final Logger log = LogManager.getLogger(GetDeviceList.class);
    public GetDeviceList(){
        super("/common/device/getDeviceList",true);
    }


    @Override
    public void displayResult(String result) {
    }

    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes,true);
        GetDeviceList getDeviceList =   new GetDeviceList();
        Map<String,Object> map = getDeviceList.getExtendsPara();
        map.put("num",100);
        map.put("page",1);
        getDeviceList.DoHttp();
        CrontabUtil.shutdown();

    }
}
